找传奇、传世资源到传世资源站!

自定义switch(ios)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

自定义开关,支持加载中
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, HLESwitchState) {    HLESwitchStateOff = 0,    HLESwitchStateOn,    HLESwitchStateLoading,};
typedef void(^vauleChangeBlock)(HLESwitchState);
NS_ASSUME_NONNULL_BEGIN
@interface HLESwitch : UIView
@property(nonatomic,assign)HLESwitchState state;//switch的状态
@property(nonatomic,assign)BOOL openLoading;//是否开启loading状态
@property(nullable, nonatomic, strong) UIColor *onTintColor API_AVAILABLE(ios(5.0)) UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, strong) UIColor *thumbTintColor API_AVAILABLE(ios(6.0)) UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, strong) UIImage *onImage API_AVAILABLE(ios(6.0)) UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, strong) UIImage *offImage API_AVAILABLE(ios(6.0)) UI_APPEARANCE_SELECTOR;
@property(nullable, nonatomic, copy) NSString *title API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(tvos);
@property(nonatomic, readonly) UISwitchStyle style API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(tvos);
@property(nonatomic) UISwitchStyle preferredStyle API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(tvos);
@property(nonatomic,strong)UIColor *activityIndicatorViewColor;
@property(nonatomic,copy)vauleChangeBlock block;
@end
NS_ASSUME_NONNULL_END

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复